package com.hospital.wx.controller.form;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@Schema(description = "评论和回复查询表单")
public class GetCommentsByPostIdForm {

    @NotNull(message = "文章ID不能为空")
    @Schema(description = "文章ID", required = true, example = "1")
    private Integer postId;

    @Min(value = 0, message = "偏移量不能小于0")
    @Schema(description = "分页偏移量，默认为0", example = "0")
    private Integer offset = 0;

    @Schema(description = "当前登录用户ID，未登录可不传", example = "10001")
    private Integer userId;

    @Min(value = 1, message = "每页显示数量必须大于0")
    @Schema(description = "每页显示评论数量，默认为10", example = "10")
    private Integer limit = 10;
}